<%@ page contentType="text/html; charset=gb2312" language="java"
	import="java.sql.*" errorPage=""%>
<%@taglib uri="/struts-tags"  prefix="s"%>
<%
String path = request.getContextPath();
String basePath = request.getScheme()+"://"+request.getServerName()+":"+request.getServerPort()+path+"/";
%>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
	<head>
		<meta http-equiv="Content-Type" content="text/html; charset=gb2312" />
		<title><s:text name="OpenNice_Header"/></title>
		<link href="css/home.css" type="text/css" rel="stylesheet" />
		<link href="css/OpenNiceTable.css" type="text/css" rel="stylesheet" />
		<link href="css/base.css" type="text/css" rel="stylesheet" />
		<script  src="<%=basePath %>jQuery/jquery-1.3.2.min.js" type="text/javascript"></script>
		<script type="text/javascript" language="javascript">
           function onResultsRowClick(target){
              document.location = target;
            } 
		</script>
       <script type="text/javascript">
           var timer=window.setInterval(getTotal, 5000);
            function getTotal(){    
                var url = 'total';
                var params = {};
                jQuery.post(url, params, callbackFun, 'json');
            }
            function callbackFun(data)
            {
              //alert(data.sonnySum+'hello'+data.userSum+data.moneySum);
              jQuery("#totalProjects").html(data.sonnySum);
              jQuery("#totalUsers").html(data.userSum);
              jQuery("#totalMoneys").html(data.moneySum);
              
            }
          </script>
		
		
	</head>
	<body>
		<div id="body">
			<div id="header">
				<jsp:include page="OpenNiceHeader.jsp" flush="false"></jsp:include>
			</div>




			<div class="banner">
				<div class="grid ban">
					<div class="c9d-addesc">
						<div style="font-size: 16px;">
							<div class="c9d-addeschead">
								Outsourcing for
								<br>
									Small Business 
							</div>
							<div class="c9d-addesctxt2">
								The world's largest outsourcing marketplace!
							</div>
							<div class="c9d-addesctxt">
								How would your business change if you had virtually unlimited
								labor at next to no cost?
							</div>
							<a href="<%=basePath %>/web/create.jsp"><div class="c9d-btn"></div>
							</a>
						</div>
					</div>
					<div class="rgt">
					</div>


				</div>
			</div>



			<div class="nav">
				<jsp:include page="OpenNiceNav.jsp" flush="false"></jsp:include>
			</div>




			<div class="introduce">
				<div class="grid">
					<div class="pointers-wrap">
						<div class="pointers ">
							<h6>
								Hire a Global Workforce
							</h6>
							<br/>
								<span class="txt-user-in-million">2.5 million</span> registered
						   <br/>
									professionals ready to work. 
						</div>
						<div class="pointers lbg">
							<h6>
								Reduce Costs
							</h6>
							<br>
								Pay as little as $30. The <br>
									average job is under $200! 
						</div>
						<div class="pointers lbg">
							<h6>
								World Class Security
							</h6>
							<br>
								Only pay once you are <br>
									100% satisfied. 
						</div>
						<div class="pointers lbg">
							<h6>
								24 Hour Online Support
							</h6>
							<br>
								Get help from our experts <br>
									whenever you need it. 
						</div>
					</div>
				</div>
			</div>



			<div class="main-info-wrap">
				<div class="grid">
					<div class="main-info1">
						<div class="txt-lrg" align="center">
							How would your business change
							<br>
								if you had virtually unlimited labor <br>
									at next to no cost? 
						</div>
						<div class="main-note">
							Did you know you can outsource just about anything to someone on
							the other side of the world?
							<br>
								<br>
									Posting a project takes seconds and in minutes you will begin
									to receive bids. <br>
										<br>
											Our secure milestone payment system means you only pay for
											the work you are happy with. 
						</div>
					</div>
					<div class="main-info2">
						<div class="stat">
							<span class="totalFp txt-20-blu" id="totalUsers">0</span> freelance
							professionals
						</div>
						<div class="stat">
							<span class="txt-20-blu currency-sign">$</span>
							<span class="totalCash txt-20-blu" style="padding-left: 0px" id="totalMoneys">0</span>
							<span class="txt-20-blu currency-code" style="padding-left: 0px">USD</span>
							user earnings
						</div>
						<div class="stat">
							<span class="totalPJ txt-20-blu" id="totalProjects">0</span> projects
							completed
						</div>
						<div class="quote-top"></div>
						<div class="quote">
							Everything from the composition of a rap song to help teach
							English to Chinese students to designing for a luxury hotel in
							Barbados.
						</div>
						<div class="quote-btm"></div>
						<div class="said-by" align="center">
							The Economist
						</div>
					</div>
				</div>
			</div>






			<div id="main">
				<div class="grid">
					<div class="content">
						<div class="txt-20-blu">
							Recent Projects
						</div>
						<div id="resultsTable">
							<div id="resultsHeader">
								<div class="viewCount">
									&nbsp;
								</div>
							</div>
							
							  <div id="resultsTable">
        <div id="resultsHeader">
          <div class="viewCount">&nbsp;</div>
       </div>
     <div id="resultsTable">
     <img width="901" height="7" alt="" src="img/new_table_top.gif"/>
          <table width="901" cellspacing="0" cellpadding="0" style="table-layout:fixed; word-wrap:break-word;">
            <tbody>
            
<tr class="headerRow">
<th width="128" align="left">Project Name</th>
<th width="155" align="left" style="text-align: left;"><a href="#" rel="nofollow">Publisher</a></th>
<th width="80" align="left" style="text-align: left;">Avg (USD)</th>
<th width="205">Job Type</th>
<th width="190"><a href="#" rel="nofollow" style="vertical-align:top">
<img border="0" src="img/arr_desc.png"/>
&nbsp;Started
</a>
</th>
</tr>
            
          <s:if test="listSonnies">
										  <s:iterator value="listSonnies" id="sonny" status="st">
										     <s:if test="#st.odd">
										     <tr class="oddRow" onmouseover="this.className='rollOverRow';"	onmouseout="this.className='oddRow';" title="Matlab Coding"
										      onclick=onResultsRowClick('<%=basePath%>web/showSonny?sonnyId=${sonny.JId }');
										     >
										      <td>${sonny. JName}</td>
										      <td>${sonny. user.UName}</td>
										      <td>${sonny. JPrice}</td>
										      <td><a href="<%=basePath%>web/showSonnyList?categoryId=${sonny.category.CId}">${sonny.category.CName}</a></td>
										      <td>${sonny. JUpdateTime}</td>
										    </tr>
										     </s:if>
										     <s:else>
										     <tr class="evenRow" onmouseover="this.className='rollOverRow';" onmouseout="this.className='evenRow';" title="Matlab Coding" 
										     onclick=onResultsRowClick('<%=basePath%>web/showSonny?sonnyId=${sonny.JId }');
										     >
										      <td>${sonny. JName}</td>
										      <td>${sonny. user.UName}</td>
										      <td>${sonny. JPrice}</td>
										      <td><a href="<%=basePath%>web/showSonnyList?categoryId=${sonny.category.CId}">${sonny.category.CName}</a></td>
										      <td>${sonny. JUpdateTime}</td>
										     </tr>
										     </s:else>
										  </s:iterator>
										</s:if> 
            </tbody>
          </table>
          <img width="901" height="11" alt="" src="img/new_table_bottom.gif"/>
     </div>
							
							<div id="resultsFooter">
							</div>
							<div class="clearBoth">
								&nbsp;
							</div>
						</div>

						<div class="nav-btns-wrap" align="center">
							<div class="nav-btns">
								<a href="<%=basePath %>/web/create.jsp"><span class="nav-a btn_sbmt">POST
										A PROJECT NOW</span>
								</a>
								<a href="<%=basePath %>/web/register.jsp"><span
									class="nav-b btn_sbmt ml20">SIGN UP NOW FOR FREE</span>
								</a>
							</div>
						</div>
					</div>
				</div>
			</div>
			<div id="foot">
				<div class="grid">
					<div class="howitworks-wrap">
						<span class="txt-20-blu nlp">How it Works</span>
						<div class="howitworks"></div>
					</div>
				</div>
			</div>
		</div>
	</body>
</html>
